package cn.seecoder.courselearning.po.course.test;

import cn.seecoder.courselearning.dto.course.CourseQuestionDTO;
import cn.seecoder.courselearning.vo.course.test.CourseQuestionVO;

public class CourseQuestionPO {
    // 题目编号
    int questionId;
    // 题干
    String question;
    // 题目答案
    String answer;
    // 题目解析
    String analysis;
    // 课程id
    int courseId;
    // 题目类型
    int questionType;

    public CourseQuestionPO() {
    }

    @Override
    public String toString() {
        return "CourseQuestionPO{" +
                "answer='" + answer + '\'' +
                '}';
    }

    public int getQuestionId() {
        return questionId;
    }

    public void setQuestionId(int questionId) {
        this.questionId = questionId;
    }

    public String getQuestion() {
        return question;
    }

    public void setQuestion(String question) {
        this.question = question;
    }

    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    public String getAnalysis() {
        return analysis;
    }

    public void setAnalysis(String analysis) {
        this.analysis = analysis;
    }

    public int getCourseId() {
        return courseId;
    }

    public void setCourseId(int courseId) {
        this.courseId = courseId;
    }

    public int getQuestionType() {
        return questionType;
    }

    public void setQuestionType(int questionType) {
        this.questionType = questionType;
    }

    public CourseQuestionPO(int questionId, String question, String answer, String analysis, int courseId, int questionType) {
        this.questionId = questionId;
        this.question = question;
        this.answer = answer;
        this.analysis = analysis;
        this.courseId = courseId;
        this.questionType = questionType;
    }


    public CourseQuestionPO(CourseQuestionDTO courseQuestionDTO) {
        this.questionId = courseQuestionDTO.getQuestionId();
        this.question = courseQuestionDTO.getQuestion();
        this.answer = courseQuestionDTO.getQuestionAnswer();
        this.analysis = courseQuestionDTO.getQuestionAnalysis();
        this.courseId =courseQuestionDTO.getCourseId();
        this.questionType =courseQuestionDTO.getQuestionType().getQuestionType();
    }

    public CourseQuestionPO(CourseQuestionVO courseQuestionVO) {
        this.questionId =courseQuestionVO.getQuestionId();
        this.question = courseQuestionVO.getQuestion();
        this.answer = courseQuestionVO.getAnswer();
        this.analysis = courseQuestionVO.getAnalysis();
        this.courseId = courseQuestionVO.getCourseId();
        this.questionType = courseQuestionVO.getQuestionType();
    }


}
